package com.lwz.startdemo

import android.content.Intent
import android.util.Log
import android.widget.Toast
import com.dopdxd.combase.base.BaseActivity
import com.lwz.startdemo.databinding.ActivityMainBinding
import com.lwz.startdemo.recyclerview.RecyclerViewActivity

class MainActivity : BaseActivity<ActivityMainBinding>(ActivityMainBinding::inflate) {

    override fun initListener() {
        super.initListener()
        mBinding.btn1.setOnClickListener {
            startActivity(Intent(this, RecyclerViewActivity::class.java))
        }
        val person = intent.getSerializableExtra("person") as Person
        Log.i("ycg",person.name)
    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        Toast.makeText(this, "onActivityResult=>$resultCode", Toast.LENGTH_SHORT).show()
    }
}